package
{
	import fl.controls.TextArea;
	
	import org.musince.system.Log;
	
	public class TALog extends Log
	{
		public var ta:TextArea; 
		
		public function TALog(ta:TextArea)
		{
			super();
			this.ta = ta;
		}
		
		override public function debug(...args):void
		{
			super.debug.apply(this, args);
			ta.appendText("[DEBUG]" + args.join(" ")+"\n");
			ta.verticalScrollPosition = ta.maxVerticalScrollPosition;
		}
		
		override public function error(...args):void
		{
			super.error.apply(this, args);
			ta.appendText("[ERROR]" + args.join(" ")+"\n");
		}
	}
}